<template>
	<view class="main">
		<u-navbar :is-back="false" :background="background" :border-bottom="false" height="48"></u-navbar>
		<view class="all">
			<view class="backcolor">

				<view class="content">
					<view class="head">
						<view class="head_l">
							<image :src="level.header" mode=""></image>
							<!-- <u-icon name="photo" color="#B7FFE9" size="58"></u-icon> -->
						</view>
						<view class="head_r">
							<view class="name">{{level.nickname}}</view>
							<text>{{level.phone}}</text>
						</view>
					</view>
					<view class="operates">
						<view class="operate">
							<image src="../../../static/images/myclass.png" @click="router('../myclass/myclass')">
							</image>
							<text>我的课程</text>
						</view>
						<view class="operate">
							<image src="../../../static/images/myinfo.png" @click="router('../myinfo/myinfo')"></image>
							<text>个人信息</text>
						</view>
						<view class="operate">
							<image src="../../../static/images/myset.png" @click="router('../myset/myset')"></image>
							<text>我的设置</text>
						</view>
					</view>
					
					<view class="questiones" @click="router('../../classes/mytest/mytest')">
						<view class="questiones_l">
							<image src="../../../static/images/tk.png" mode=""></image>
							<text>题库</text>
						</view>
						<view class="questiones_r">
							<image src="../../../static/images/right.png" mode=""></image>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				background: {
					backgroundImage: 'linear-gradient(90deg, #00CC8D 28.000000000000004%, #00DDA7 100%)',
				},
				level: ''
			}
		},
		onLoad() {
			
		},
		onShow() {
			this.getlevel()
		},
		methods: {
			//权限
			getlevel() {
				global.$http.request({
					url: '/api/User/info',
					data: {
						token: uni.getStorageSync('token')
					}
				}).then(res => {
					if (res.data.code == 200) {
						this.level = res.data.data[0]
					}
				})
			},
			// 
			router(path) {
				uni.navigateTo({
					url: path
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		font-family: PingFang SC;

		background-color: #F7F7F7;

		.main {
			width: 750rpx;

			.all {
				.backcolor {
					width: 750rpx;
					height: 300rpx;
					background: linear-gradient(90deg, #00CC8D 28.000000000000004%, #00DDA7 100%);
					position: relative;

				}

				.content {
					position: absolute;
					top: 36rpx;

					.head {
						padding: 30rpx 0rpx 40rpx 36rpx;
						display: flex;
						align-items: center;

						.head_l {
							z-index: 1;
							width: 116rpx;
							height: 116rpx;
							text-align: center;
							line-height: 130rpx;
							// background: #FFFFFF;
							border-radius: 50%;
							image{
								border: 4rpx solid #BEFFED;
								width: 110rpx;
								height: 110rpx;
								border-radius: 50%;
							}
						}

						.head_r {
							padding-left: 28rpx;

							view {
								font-size: 40rpx;
								font-family: Source Han Sans CN;
								font-weight: bold;
								color: #FFFFFF;
								padding-bottom: 11rpx;
							}

							text {
								font-size: 24rpx;
								font-family: Source Han Sans CN;
								font-weight: 400;
								color: #FFFFFF;
								opacity: 0.9;
							}
						}
					}

					.operates {
						width: 690rpx;
						margin: 0 30rpx;
						height: 194rpx;
						background: #FFFFFF;
						border-radius: 20rpx;
						display: flex;
						justify-content: space-around;
						padding: 33rpx 0;

						.operate {
							display: flex;
							flex-direction: column;
							align-items: center;

							image {
								width: 88rpx;
								height: 88rpx;
							}

							text {
								font-size: 24rpx;
								font-family: Source Han Sans CN;
								font-weight: 400;
								color: #000000;
							}
						}
					}
					.questiones{
						padding: 36rpx 25rpx;
						margin: 10rpx 0;
						background-color: #fff;
						display: flex;
						justify-content: space-between;align-items: center;
						.questiones_l{
							display: flex;
							align-items: center;
							image{
								width: 32rpx;
								height: 32rpx;
							}
							text{
								padding-left: 10rpx;
								font-size: 26rpx;
								font-family: Source Han Sans CN;
								font-weight: 400;
								color: #7B7B7B;
							}
						}
						.questiones_r{
							image{
								width: 8rpx;
								height: 14rpx;
							}
						}
					}
				}

			}
		}
	}
</style>
